Spectral optimization of audio masking waveforms

ABSTRACT

A system for masking audio signals includes a microphone for generating an ambient audio signal representing ambient noise, a speaker for rendering masking audio, and a processor in communication with the microphone and the speaker. The processor performs spectral analysis on the ambient audio signal from the microphone to determine a spectral envelope of the ambient noise, adjusts a frequency response of an optimizing filter based on the spectral envelope, applies the optimizing filter to a baseline masking waveform, producing an output waveform with relative spectral distribution matching the ambient noise, and provides the output waveform to the speaker.

PRIORITY CLAIM

This application claims priority to U.S. Provisional Application62/346,777, filed Jun. 7, 2016, the entire contents of which areincorporated here by reference.

BACKGROUND

Human beings subjected to high ambient acoustic noise environments cansuffer a variety of negative effects, such as degraded ability toperform tasks or inability to sleep.

Several techniques exist to reduce the effects of ambient noise. Forinstance, sound absorbing material can surround the ears or be insertedin the ear canal, typically achieving 20 to 30 dB reduction of externalsounds. Passive noise attenuation can be supplemented by combiningabsorptive materials with an acoustic transducer, such as a miniaturespeaker. The transducer is used to produce sounds which may be designedto actively cancel residual noise at the ear, or to provide sounds whichare designed to conceal the external noise through the psychoacousticphenomenon of masking, where one sound prevents the perception ofanother. A masking signal as typically implemented can achieve a totalperceived noise suppression of up to 70 dB in combination with soundabsorption materials alone or sound absorption plus active cancellation.

The present invention describes a technique for improving theperformance of audio waveforms generated specifically for sound masking.

SUMMARY

In general, in one aspect, a system for masking audio signals includes amicrophone for generating an ambient audio signal representing ambientnoise, a speaker for rendering masking audio, and a processor incommunication with the microphone and the speaker. The processorperforms spectral analysis on the ambient audio signal from themicrophone to determine a spectral envelope of the ambient noise,adjusts a frequency response of an optimizing filter based on thespectral envelope, applies the optimizing filter to a baseline maskingwaveform, producing an output waveform with relative spectraldistribution matching the ambient noise, and provides the outputwaveform to the speaker.

Implementations may include one or more of the following, in anycombination. The processor may adjust the level of sound output by thespeaker to maximize perceived suppression of external noise sources bythe rendered masking audio. The processor may apply a non-adaptiveequalization filter to the output waveform before providing theequalized output waveform to the speaker. The processor may perform thespectral analysis by amplifying the ambient audio signal, applying anarray of bandpass filters with center frequencies distributed across theaudio band to the amplified signal, producing bandpass-filtered signals,measuring the magnitude of the bandpass-filtered signals from eachbandpass filter, combining the measured output magnitudes to form aspectral mask of the ambient noise over the audio band, and normalizingand scaling the spectral mask to generate adjustment coefficients of theoptimizing filter. The processor may apply the array of bandpass filtersby applying digital IIR or FIR filters to the amplified signal. Theprocessor may apply the array of bandpass filters by repeatedly applyingan adjustable bandpass filter to the amplified signal, with the centerfrequency changing for each application.

The processor may perform the spectral analysis by applying a discretefast-Fourier transform (DFFT) to a digital representation of the ambientaudio signal, the DFFT output consisting of a plurality of frequencybins, using the values in the DFFT output bins as representations of themagnitude of the ambient sound in each of a plurality of frequency bandscorresponding to the frequency bins, combining the magnitudes to form aspectral mask of the ambient noise over the audio band, and normalizingand scaling the spectral mask to generate adjustment coefficients of theoptimizing filter. The spectral analysis may be performed over asampling interval of between 10 and 300 seconds. The spectral analysismay be performed over a sampling interval of between 20 and 30 seconds.The processor may repeat the spectral analysis, frequency responseadjustment, and application of the optimizing filter on a periodicbasis. The periodic basis may be every five minutes. The output of eachrepetition of the application of the optimizing filter may be combinedwith previous results to produce a long-term composite measurement. Thelong-term composite measurement of analysis performed over at least afirst night may be used to produce an output waveform for use onsubsequent nights. The processor may provide the output waveform to thespeaker by storing the output waveform in a memory, and retrieving theoutput waveform from the memory and providing it to an amplifier coupledto the speaker. The processor may provide the output waveform to thespeaker by providing the output waveform to an amplifier coupled to thespeaker as the output waveform may be generated.

One or more of the processor tasks may be performed by a portablecomputing device. The microphone may be a component of the portablecomputing device, and the speaker may be a component of an earbud inwireless communication with the portable computing device. Themicrophone may be external to the portable computing device. Themicrophone and the speaker may be components of an earbud in wirelesscommunication with the portable computing device. One or more of theprocessor tasks may be performed by the portable computing device,results of those tasks being transferred to the earbud, the remainder ofthe processor tasks being performed in the earbud. The spectral analysisand the adjusting of the frequency response of the optimizing filter maybe performed in the portable computing device, the adjustment to theoptimizing filter may be provided to the earbud, and the application ofthe filter may be performed in the earbud. The processor, microphone,and speaker may be components of an earbud. The earbud may be inwireless communication with a portable computing device, the portablecomputing device providing a user interface for configuring theprocessor of the earbud. The processor may adjust the frequency responseof the optimizing filter and apply the optimizing filter to the baselinemasking waveform by activating one or more switches to direct a signalrepresenting the baseline masking waveform to a selected one of a set ofoptimizing filters, and to direct output of the selected optimizingfilter to the speaker.

In general, in one aspect, masking audio signals includes receiving anambient audio signal representing ambient noise from a microphone,performing spectral analysis on the ambient audio signal from themicrophone to determine a spectral envelope of the ambient noise,adjusting a frequency response of an optimizing feature based on thespectral envelope, applying the optimizing filter to a baseline maskingwaveform, producing an output waveform with relative spectraldistribution matching the ambient noise, and providing the outputwaveform to a speaker.

Implementations may include one or more of the following, in anycombination. The spectral analysis may include applying a discretefast-Fourier transform (DFFT) to a digital representation of the ambientaudio signal, the DFFT output consisting of a plurality of frequencybins, using the values in the DFFT output bins as representations of themagnitude of the ambient sound in each of a plurality of frequency bandscorresponding to the frequency bins, combining the magnitudes to form aspectral mask of the ambient noise over the audio band, and normalizingand scaling the spectral mask to generate adjustment coefficients of theoptimizing filter.

BRIEF DESCRIPTION OF THE FIGURES

FIGS. 1, 2, and 3 show block diagrams of systems for optimizing audiomasking waveforms.

DETAILED DESCRIPTION

Generation of Masking Waveforms or Tones

Various artificial or natural sounds are effective for noise masking.For example, natural sounds such as rainfall, ocean waves and waterflowing in streams or rivers have been used. An example of an artificialmasking sound is the use of generated random noise, where thedistribution of the noise over the human hearing frequency range(typically considered as 20 Hz to 20 kHz) can be for example white noise(constant energy per unit of frequency) or pink noise (constant energyper unit log frequency or octave). In these simple examples, thefrequency or spectral distribution of the masking sound is fixed duringcreation of the waveform, and therefore does not take into account thespecific characteristics of the ambient external noise environment.

As currently implemented, the masking waveform is delivered to the audiotransducer located in or near the ears, and its amplitude level orloudness is adjusted to provide an acceptable level of perceived ambientnoise suppression. Setting of the relative loudness of the deliveredmasking sound is a critical aspect of the performance of the method,since insufficient levels may not deliver adequate perceived noisesuppression, while excessive levels may result in the masking soundsbeing objectionable themselves.

The present invention optimizes the performance of masking waveforms bymatching the spectral distribution of sound energy to that of theambient noise environment, thus allowing the masking sound level at theoutput transducer to be adjusted for maximum suppression effectivenesswhile avoiding excessive levels.

FIG. 1 illustrates the general system. An audio transducer 102, forexample a microphone, is positioned in the ambient sound environment104, and a spectral analysis is performed (106) on its output. Thespectral envelope of the ambient noise is determined (108) and used toadjust the frequency response of an optimizing filter 110, through whichthe baseline masking waveform (112) is then passed, resulting in anoutput waveform with relative spectral distribution matching theexternal ambient noise. The masking waveform 112 may be generated or maybe a stored file which is played back and looped. In some examples, asmall set of pre-configured filters are available, with simple analogswitching used to route the audio signal through the filter that bestmatches the noise. A further, non-adaptive, equalization filter 114 maythen be used to compensate for spectral response of an outputtransducer, for example a speaker element, as well as any otherequalization appropriate to the use which is common to all settings ofoptimizing filter 110. The composite masking waveform 116 is thendelivered to the output transducer. Adjustment of the sound level at theear is performed to achieve maximum perceived suppression of externalnoise sources.

FIG. 2 illustrates a first example implementation of the method. Ameasurement microphone 202 is positioned near or at the listeninglocation, and its output is amplified to a level suitable for spectralanalysis. The ambient sound waveform is then input to an array 206 of Nbandpass filters with center frequencies distributed across the audioband.

The bandpass filters may be realized using various implementations. Forexample they could consist of analog active or passive filters. Anotherexample is the use of digital IIR or FIR filters or a Discrete FourierTransform. Another example is the use of a single adjustable bandpassfilter where the center frequency is swept over the audio band, eitherdirectly or by using frequency conversion of the input band.

The output magnitude of each filter is measured and combined (208) toform a spectral mask of the environmental noise over the audio band. Thespectral mask is then normalized and scaled (218) to form the adjustmentcoefficients of the output optimizing filter 210. Similar to the inputfilters, the output filter can be realized using any of the methodspreviously presented.

The masking waveform is then generated or played back (112) and fedthrough the optimization and equalization filters 210, the output ofwhich is then mixed (220) and delivered to the output transducer (114,116). The output waveform may be delivered using a variety oftechniques. For example it could be stored in a file for later playbackor delivered directly to the output transducer after appropriateamplification.

FIG. 3 illustrates a realization of the method using a generalizedcomputing platform to perform the required signal processing. Possiblecomputing platforms include, but are not limited to, devices such assmartphones, tablets, or conventional personal computers.

In this realization, the input transducer is positioned near thelistening position. If a microphone is used, it may be contained withinthe computing platform, for example, within a smartphone. Alternativelyan external microphone could be attached, potentially providing improvedfrequency response and directivity more suited to the maskingapplication as compared to the device's embedded microphone.

The transducer output is amplified and directed to an analog-to-digitalconverter 306, whose output is then processed through a discretefast-Fourier transform (DFFT) algorithm 308. The DFFT output consists ofN frequency bins which are equivalent to a bank of parallel bandpassfilters. Each bin contains a value proportional to the magnitude ofambient sound energy in its equivalent bandwidth around each equivalentfilter center frequency.

The measured spectral envelope is normalized and scaled (318) to derivecoefficients 310 used adjust the output digital filter bank 320 to theoptimized spectral envelope. The baseline masking waveform 112 isdirected to the inputs of the optimization filters. Outputs from theoptimization filters are summed and directed to the transducerequalization filter 114, after which the optimized masking waveform file116 is generated and stored in a standard audio file.

As previously discussed, the optimized waveform can be delivered to thetarget output transducer using one of several methods such as a storedfile transfer or via an appropriate communication and amplificationprocess. For example, the analysis to determine the optimization (104through 310 in FIG. 3) could be done in a device whereas generation orplayback of a stored baseline masking waveform (112) and its subsequentequalization (320 and 114) are done in the user-worn earpieces. Thecoefficients describing the optimization passed from 310 to 320 can becommunicated by various means such as Bluetooth. Since changing maskingshould be done very slowly so that the changes in the sound of themasking are not in themselves distracting, the bandwidth and powerrequirements needed to support that communication is very small.

The realization shown in FIG. 3 would be implemented on a smartphone,running application software designed to perform the required signalprocessing functions. This platform has several advantages in the endapplication of the system. These advantages include, but are not limitedto:

-   -   1. The platform is widely available, and the end user likely        will already have a compatible device.    -   2. All required hardware and computing resources are contained        within a small, portable device which can quickly be positioned        at or near the listening position.    -   3. The system output shown in FIG. 3 would consist of an audio        playback file compatible with user-worn earpieces designed        specifically for noise suppression. The smartphone platform also        provides the communication hardware and protocol required to        wirelessly transfer the file to the target device or to        communicate equalization parameters to a much more        limited-in-capability equalization process running in the target        device.    -   4. The included communication capability, such as Bluetooth, and        application software provides for user interaction and control        of the earpiece device. For example, the user can enable or        disable playback of the masking waveform, or the earpiece can        notify the user of battery status or other operational        parameters.    -   5. Application software can be easily installed and updated via        an internet connection.    -   6. The application software can be designed to perform various        tasks or processes on a scheduled basis.    -   7. Interfaces, such as USB and a microphone/earpiece connector,        are provided for attachment of external devices which may        enhance the performance of the system.

In the envisioned operation of the present invention, in combinationwith existing noise suppression earpieces, (the product), an end-userwould run the application software which was previously installed on asmartphone. The primary intended purpose of the product is to providesuppression of ambient noise during sleep, so the user would thus placethe smartphone at the intended sleeping position, such as on a pillow,and then initiate a measurement of the ambient sound environment via anapplication control. This initiation may be manual or may automaticallystart if the user wishes when masking is turned on.

Using its internal microphone as the input transducer, the process shownin FIG. 3 would be performed over some sampling interval Ts, where thesampling interval might have a default value of 10 seconds but allow fordifferent intervals to selected by the user. Values of 20 to 30 seconds,or as long as 300 seconds (five minutes) may be desirable. For example,a longer measurement might be desired if the end user observes that aperiodic transient noise source is present which might not be capturedin a short interval. While rapid response to a transient noise can bejust as disruptive as the noise, a sampling period that captures it mayresult in a long-term masking signal that successfully masks thetransient noise. Alternatively, the noise measurement process (104through 308) may run continuously and then averaging of the noisespectrum over time is done as part of 318. This averaging may bedesigned to provide the average energy of the noise or to respond toshort transients in the noise. At the completion of the spectralcharacterization process, the optimized masking waveform file would bedownloaded automatically to the earpiece(s) or the optimizationparameters transferred. The user would then install the earpieces andactivate playback of the file via the control aspect of the applicationsoftware at the appropriate time.

A single characterization of the ambient sound environment will provideexcellent masking performance if external noise sources are relativelyinvariant. However, it is not unreasonable to expect certain noises,such as a partner's snoring or various household appliances, to stop orstart during a sleep period. Therefore, the application software couldbe configured to automatically perform the measurement process atregular intervals, such as every five minutes. The spectral parametersassociated with the current version of the optimized waveform would bestored in memory, and new measured parameters would be compared withthem and a determination made as to whether significant ambient changeshave occurred. If sufficient change is detected, a new optimizedwaveform file would be generated and automatically transferred to theearpieces for playback. In other examples, a long-term average may beused, with measurements taken throughout the night, but the filtersupdated only after the full night, or several nights, has been recorded.In this way, a fixed filter, which doesn't react to short-term changes,but does mask all the typical noises in the environment, may be used.

The automated re-optimization process would require that the smartphone,with its internal microphone, remain positioned near the user's headover the sleep period. This could be inconvenient or undesirable to theuser. Using the headset connector of the smartphone or a wirelessconnection, an external microphone could be used instead. The accessorymicrophone can be much smaller than the smartphone, thus providingbetter options for positioning it in a convenient and undisturbedlocation near the user's head.

An external microphone can also provide enhanced measurementperformance. For example, the smartphone microphone is designed toperform optimally for capturing the voice audio band, and isintentionally directional to provide suppression of undesired soundduring voice calls. Frequency response shaping of the internalmicrophone and its directionality can each result in some degradation ofaccuracy in the ambient sound spectral measurement. However, it ispossible to provide additional equalization parameters at theoptimization filter of FIG. 3 to compensate for a typical internalmicrophone response, but the effect of directionality depends on theposition of the phone during the measurement and its spatial orientationrelative to ambient noise sources. External microphones withnon-directional characteristics and relatively flat frequency responseare readily available, and if used instead of the internal smartphonemicrophone, would substantially improve the accuracy of an ambient soundmeasurement.

An additional benefit of an external microphone is that its response canbe calibrated in terms of sound pressure level (SPL), a widely usedparameter for measurements related to sound. If the measured spectralenvelope is in terms of SPL, this allows the system of FIG. 3 toestimate the average actual sound incident on the earpiece elements.Given knowledge of the noise attenuation response of the earpiece in theear, a good estimate of the playback volume setting for the maskingwaveform in the earpiece can be made and transferred to the earpiecealong with the optimized file. Thus, user interaction with the playbacklevel setting can be minimized in most circumstances.

The foregoing description illustrates exemplary implementations, andnovel features, of aspects of a system, method and apparatus forspectral optimization of audio masking waveforms. Alternativeimplementations are suggested, but it is impractical to list allalternative implementations of the present teachings. Therefore, thescope of the presented disclosure should be determined only by referenceto the appended claims, and should not be limited by featuresillustrated in the foregoing description except insofar as suchlimitation is recited in an appended claim.

While the processes described result in a masking signal, as deliveredto the ear, which is adapted to match changes in the ambient noiseenvironment to most effectively mask them while still being playedquietly, matching the environment may not be the best choice in terms ofcreating a pleasant and sleep-facilitating experience for the user. Forthis reason, the optimization filter control (218 or 310) may inaddition include rules that prevent the optimized masking signal fromtaking on an annoying quality. These may include, for example,broadening of narrow-band peaks that may have been measured in theambient acoustic environment (such as might be caused by a squeakingfan) or to ensure that ratio of low to mid to high frequencies does notskew too much from what is deemed pleasant. In this example, if thesystem measures a substantial increase in broad high-frequency noise,rather than making the masking unpleasantly harsh and bright it isbetter to increase energy at lower frequencies in balance with thehigher frequencies.

While the above description has pointed out novel features of thepresent disclosure as applied to various embodiments, the skilled personwill understand that various omissions, substitutions, permutations, andchanges in the form and details of the present teachings illustrated maybe made without departing from the scope of the present teachings.

Each practical and novel combination of the elements and alternativesdescribed hereinabove, and each practical combination of equivalents tosuch elements, is contemplated as an embodiment of the presentteachings. Because many more element combinations are contemplated asembodiments of the present teachings than can reasonably be explicitlyenumerated herein, the scope of the present teachings is properlydefined by the appended claims rather than by the foregoing description.All variations coming within the meaning and range of equivalency of thevarious claim elements are embraced within the scope of thecorresponding claim. Each claim set forth below is intended to encompassany apparatus, system, method, or article of manufacture that differsonly insubstantially from the literal language of such claim, as long assuch apparatus, system, method, or article of manufacture is not, infact, an embodiment of the prior art. To this end, each describedelement in each claim should be construed as broadly as possible, andmoreover should be understood to encompass any equivalent to suchelement insofar as possible without also encompassing the prior art.Furthermore, to the extent that the term “includes” is used in eitherthe detailed description or the claims, such term is intended to beinclusive in a manner similar to the term “comprising.”

What is claimed is:
 1. A system for masking audio signals, the systemcomprising: a microphone for generating an ambient audio signalrepresenting ambient noise; a speaker for rendering masking audio; aprocessor in communication with the microphone and the speaker, andconfigured to: perform spectral analysis on the ambient audio signalfrom the microphone to determine a spectral envelope of the ambientnoise, based on the spectral envelope, adjust a frequency response of anoptimizing filter, apply the optimizing filter to a pre-existing,broad-band baseline masking waveform, producing an output waveform withrelative spectral distribution matching the ambient noise, apply anon-adaptive equalization filter to the output waveform to produce anequalized output waveform, wherein the non-adaptive equalization filteris configured to compensate for a spectral response of the speaker, andprovide the equalized output waveform to the speaker.
 2. The system ofclaim 1, wherein the processor is further configured to adjust the levelof sound output by the speaker to maximize perceived suppression ofexternal noise sources by the rendered masking audio.
 3. The system ofclaim 1, wherein the processor is configured to perform the spectralanalysis by: amplifying the ambient audio signal; applying an array ofbandpass filters with center frequencies distributed across the audioband to the amplified signal, producing bandpass-filtered signals;measuring the magnitude of the bandpass-filtered signals from eachbandpass filter; combining the measured output magnitudes to form aspectral mask of the ambient noise over the audio band; and normalizingand scaling the spectral mask to generate adjustment coefficients of theoptimizing filter.
 4. The system of claim 3, wherein the processor isconfigured to apply the array of bandpass filters by applying digitalIIR or FIR filters to the amplified signal.
 5. The system of claim 3,wherein the processor is configured to apply the array of bandpassfilters by repeatedly applying an adjustable bandpass filter to theamplified signal, with the center frequency changing for eachapplication.
 6. The system of claim 1, wherein the processor isconfigured to perform the spectral analysis by: applying a discretefast-Fourier transform (DFFT) to a digital representation of the ambientaudio signal, the DFFT output consisting of a plurality of frequencybins; using the values in the DFFT output bins as representations of themagnitude of the ambient sound in each of a plurality of frequency bandscorresponding to the frequency bins; combining the magnitudes to form aspectral mask of the ambient noise over the audio band; and normalizingand scaling the spectral mask to generate adjustment coefficients of theoptimizing filter.
 7. The system of claim 1, wherein the spectralanalysis is performed over a sampling interval of between 10 and 300seconds.
 8. The system of claim 1, wherein the spectral analysis isperformed over a sampling interval of between 20 and 30 seconds.
 9. Thesystem of claim 1, wherein the processor is configured to repeat thespectral analysis, frequency response adjustment, and application of theoptimizing filter on a periodic basis.
 10. The system of claim 1,wherein the processor is configured to provide the output waveform tothe speaker by storing the output waveform in a memory, and retrievingthe output waveform from the memory and providing it to an amplifiercoupled to the speaker.
 11. The system of claim 1, wherein the processoris configured to provide the output waveform to the speaker by providingthe output waveform to an amplifier coupled to the speaker as the outputwaveform is generated.
 12. The system of claim 1, wherein one or more ofthe processor tasks are performed by a portable computing device. 13.The system of claim 12, wherein the microphone is a component of theportable computing device, and the speaker is a component of an earbudin wireless communication with the portable computing device.
 14. Thesystem of claim 12, wherein the microphone is external to the portablecomputing device.
 15. The system of claim 12, wherein the microphone andthe speaker are components of an earbud in wireless communication withthe portable computing device.
 16. The system of claim 1, wherein theprocessor, microphone, and speaker are components of an earbud.
 17. Thesystem of claim 16, wherein the earbud is in wireless communication witha portable computing device, the portable computing device providing auser interface for configuring the processor of the earbud.
 18. Thesystem of claim 1, wherein the processor is configured to adjust thefrequency response of the optimizing filter and apply the optimizingfilter to the baseline masking waveform by activating one or moreswitches to direct a signal representing the baseline masking waveformto a selected one of a set of optimizing filters, and to direct outputof the selected optimizing filter to the speaker.
 19. A method ofmasking audio signals, the method comprising: receiving an ambient audiosignal representing ambient noise from a microphone; performing spectralanalysis on the ambient audio signal from the microphone to determine aspectral envelope of the ambient noise; based on the spectral envelope,adjusting a frequency response of an optimizing feature; applying theoptimizing filter to a pre-existing, broad-band baseline maskingwaveform, producing an output waveform with relative spectraldistribution matching the ambient noise; applying a non-adaptiveequalization filter to the output waveform to produce an equalizedoutput waveform, wherein the non-adaptive equalization filter isconfigured to compensate for a spectral response of a speaker; andproviding the equalized output waveform to the speaker.
 20. The methodof claim 19, wherein perform the spectral analysis comprises: applying adiscrete fast-Fourier transform (DFFT) to a digital representation ofthe ambient audio signal, the DFFT output consisting of a plurality offrequency bins; using the values in the DFFT output bins asrepresentations of the magnitude of the ambient sound in each of aplurality of frequency bands corresponding to the frequency bins;combining the magnitudes to form a spectral mask of the ambient noiseover the audio band; and normalizing and scaling the spectral mask togenerate adjustment coefficients of the optimizing filter.